require 'digest/md5'

class Customer
  attr_accessor :id, :login, :fname, :lname, :passwordmd5, :money_spended
  @@next_id=0
  def initialize( login, fname,lname, password)
    @id=@@next_id
    @login=login
    @fname=fname
    @lname=lname
    @passwordmd5=Digest::MD5.hexdigest(password)
    @money_spended=0
    @@next_id+=1
  end
  def next_id
    @@next_id
  end
  def change_next_id(value)
    @@next_id=value
  end
end
